TintTypedArray

A class that wraps a TypedArray and provides the same public API surface. The purpose of this class is so that we can intercept calls to new APIs.

Functions

Link copied to clipboard
open fun getBoolean(index: Int, defValue: Boolean): Boolean
Link copied to clipboard
@RequiresApi(value = 21)
open fun getChangingConfigurations(): Int
Link copied to clipboard
open fun getColor(index: Int, defValue: Int): Int
Link copied to clipboard
Link copied to clipboard
open fun getDimension(index: Int, defValue: Float): Float
Link copied to clipboard
open fun getDimensionPixelOffset(index: Int, defValue: Int): Int
Link copied to clipboard
open fun getDimensionPixelSize(index: Int, defValue: Int): Int
Link copied to clipboard
open fun getDrawable(index: Int): Drawable
Link copied to clipboard
open fun getDrawableIfKnown(index: Int): Drawable
Link copied to clipboard
open fun getFloat(index: Int, defValue: Float): Float
Link copied to clipboard
@Nullable
open fun getFont(@StyleableRes index: Int, style: Int, fontCallback: @Nullable ResourcesCompat.FontCallback): @Nullable Typeface
Retrieve the Typeface for the attribute at index.
Link copied to clipboard
open fun getFraction(index: Int, base: Int, pbase: Int, defValue: Float): Float
Link copied to clipboard
open fun getIndex(at: Int): Int
Link copied to clipboard
open fun getIndexCount(): Int
Link copied to clipboard
open fun getInt(index: Int, defValue: Int): Int
Link copied to clipboard
open fun getInteger(index: Int, defValue: Int): Int
Link copied to clipboard
open fun getLayoutDimension(index: Int, defValue: Int): Int
open fun getLayoutDimension(index: Int, name: String): Int
Link copied to clipboard
open fun getNonResourceString(index: Int): String
Link copied to clipboard
Link copied to clipboard
open fun getResourceId(index: Int, defValue: Int): Int
Link copied to clipboard
Link copied to clipboard
open fun getString(index: Int): String
Link copied to clipboard
open fun getText(index: Int): CharSequence
Link copied to clipboard
open fun getTextArray(index: Int): Array<CharSequence>
Link copied to clipboard
open fun getType(index: Int): Int
Link copied to clipboard
open fun getValue(index: Int, outValue: TypedValue): Boolean
Link copied to clipboard
Beware, you very likely do not intend to this method.
Link copied to clipboard
open fun hasValue(index: Int): Boolean
Link copied to clipboard
open fun length(): Int
Link copied to clipboard
open fun obtainStyledAttributes(context: Context, resid: Int, attrs: Array<Int>): TintTypedArray
open fun obtainStyledAttributes(context: Context, set: AttributeSet, attrs: Array<Int>, defStyleAttr: Int, defStyleRes: Int): TintTypedArray
Link copied to clipboard
open fun peekValue(index: Int): TypedValue
Link copied to clipboard
open fun recycle()